package com.zyz.E_面向对象.C_构造器;

/**
 * @author: vick
 * @Date: 2025/3/14
 * @Description:
 * @version: 1.0
 */
public class Person {
    public int age;

    public String name;


    //无参构造器
    public Person() {
        System.out.println("无参构造器");
    }

    public Person(int age) {
        System.out.println("有参构造器");
        this.age = age;
    }

    public Person(int age, String name) {
        this.age = age;
        this.name = name;
    }
}
